#include <iostream>

using namespace std;

class Object 
{
    public:
        void setWith(int w)
        {
            width = w;
        }
        void setHeight(int h)
        {
            height = h;
        }
    protected:
        int width;
        int height;
};

// 基类 PaintCost
class PaintCost 
{
   public:
      int getCost(int area)
      {
         return area * 70;
      }
};

class Shape: public Object,public PaintCost
{
    public:
        int getArea()
        {
            return (width * height);
        }
};

int main(void)
{
    Shape shape;
    shape.setWith(5);
    shape.setHeight(20);
    cout << "Total area: " << shape.getArea() << endl;
    cout << "PaintCost :" << shape.getCost(shape.getArea()) << endl;
    return 0;
}